<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<c:set var="path" value="${pageContext.request.contextPath }" />
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="renderer" content="webkit">
<meta http-equiv="Cache-Control" content="no-siteapp" />
<title>搜索-${name}</title>
<link rel="shortcut icon" href="favicon.ico">
<!--[if lt IE 8]>
    <meta http-equiv="refresh" content="0;ie.html" />
    <![endif]-->

<!-- 本框架基本脚本和样式 -->
<script type="text/javascript"
	src="${path }/resource/js/jquery-2.1.4.min.js"></script>
<script type="text/javascript"
	src="${path }/resource/js/systools/MBase.js"></script>

<!-- 界面单独引入的其他样式和脚本 -->
<link rel="stylesheet"
	href="${path }/resource/plugin/zTree/zTreeStyle/zTreeStyle.css"
	type="text/css">
<script type="text/javascript"
	src="${path }/resource/plugin/zTree/jquery.ztree.core-3.5.min.js"></script>
<style type="text/css">
.hkdg {
	width: 100px;
	height: 100px;
	margin: 5px;
	border: 1px solid #aeaeae;
	border-radius: 5px;
	padding: 3px;
	margin: 5px;
}

blockquote {
	font-size: 14px;
	line-height: 25px;
}

.title {
	color: #6f5499;
	font-size: 32px;
	text-shadow: 2px 3px 2px #ababab;
}
</style>

</head>

<body class="gray-bg">
	<form class="form-horizontal" id="dataform" action="${path}/interface/searchInterface"  method="post" >
	<div class="wrapper wrapper-content  animated fadeInRight">
		<h2 class=" title">
			<a href="${path }/interface/welcome">Matrix项目接口</a>
		</h2>
		<a style="float: right;" href="${path }/common/redirect/login" >登录</a>
		<br>
		<div class="row">
			<div class="col-sm-6">
				<input class="form-control" placeholder="请输入接口名称" name="name"
					value="${name }">
			</div>
			<div class="col-sm-1">
				<button type="submit" class="btn btn-success">
					<i class="fa fa-search"></i> 搜索
				</button>
			</div>
		</div>
		<hr>
	</div>
</form>
	<div class="wrapper wrapper-content  animated fadeInRight">
		<div class="row">
			<div class="col-sm-9">
				<div class="ibox float-e-margins">
					<div class="ibox-title">
						<h5>搜索结果</h5>
						<div class="ibox-tools"></div>
					</div>
					<div class="ibox-content " style="min-height: 400px">
						<div id="ulList" class="list-group">
							<c:forEach items="${list }" var="item">
								<a class="list-group-item" target="_blank"
									href="${path}/interface/showInterface?id=${item.id}">【${item.projName}】—— <span class="text-primary"> ${item.name}</span> </a>
							</c:forEach>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<script type="text/javascript">
	var reg = new RegExp("${name}", "g");
	var str=$("#ulList").html();
	var result = str.replace(reg,"<font style='color:#c00;;font-weight:700;'>${name}</font>");
	$("#ulList").html(result);
	</script>
</body>
</html>